import request from '@/utils/request'

//  查询专题检查列表
export function queryInspectList(params) {
  return request({
    url: '/business/inspect/inspectBase/queryInspectList',
    method: 'get',
    params
  })
}

//  获取专题检查详情
export function getInspectDetail(params) {
  return request({
    url: `/business/inspect/inspectBase/getInspectDetail`,
    method: 'get',
    params
  })
}

//  下发检查
export function publishInspect(params) {
  return request({
    url: `/business/inspect/inspectBase/publishInspect`,
    method: 'get',
    params
  })
}

//  新增检查
export function addInspect(data) {
  return request({
    url: '/business/inspect/inspectBase/addInspect',
    method: 'post',
    data
  })
}

//  新增检查并下发
export function addInspectAndPublish(data) {
  return request({
    url: '/business/inspect/inspectBase/addInspectAndPublish',
    method: 'post',
    data
  })
}

//  更新检查
export function updateInspect(data) {
  return request({
    url: '/business/inspect/inspectBase/updateInspect',
    method: 'put',
    data
  })
}

//  更新检查并下发
export function updateInspectAndPublish(data) {
  return request({
    url: '/business/inspect/inspectBase/updateInspectAndPublish',
    method: 'put',
    data
  })
}

// 删除检查
export function delDefectInspect(params) {
  return request({
    url: `/business/inspect/inspectBase/removeInspect`,
    method: 'delete',
    params
  })
}
